package tom_io_nio.nio.buffer;

import java.nio.ByteBuffer;

public class BufferWarp {

    public static void  main(String[] args){

        //分配缓冲区
        ByteBuffer buffer = ByteBuffer.allocate(10);


        //包装一个现有的数据
//        byte[] array = new byte[20];
        byte[] array = "李博飞".getBytes();
        ByteBuffer buffer1 = ByteBuffer.wrap(array);
        System.out.println(buffer1);
    }
}
